home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / site-packages / impacket / dcerpc / conv.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2006-06-30  |  3KB  |  83 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.4)
  3.  
  4. import array
  5. from impacket import ImpactPacket
  6. MSRPC_UUID_CONV = 'v":3\x00\x00\x00\x00\r\x00\x00\x80\x9c\x00\x00\x00'
  7.  
  8. class WhoAreYou(ImpactPacket.Header):
  9.     OP_NUM = 1
  10.     __SIZE = 20
  11.     
  12.     def __init__(self, aBuffer = None):
  13.         ImpactPacket.Header.__init__(self, WhoAreYou._WhoAreYou__SIZE)
  14.         if aBuffer:
  15.             self.load_header(aBuffer)
  16.         
  17.  
  18.     
  19.     def get_activity_binuuid(self):
  20.         return self.get_bytes().tolist()[0:0 + 16]
  21.  
  22.     
  23.     def set_activity_binuuid(self, binuuid):
  24.         if not 16 == len(binuuid):
  25.             raise AssertionError
  26.         self.get_bytes()[0:0 + 16] = array.array('B', binuuid)
  27.  
  28.     
  29.     def get_boot_time(self):
  30.         return self.get_long(16, '<')
  31.  
  32.     
  33.     def set_boot_time(self, time):
  34.         self.set_long(16, time, '<')
  35.  
  36.     
  37.     def get_header_size(self):
  38.         return WhoAreYou._WhoAreYou__SIZE
  39.  
  40.  
  41.  
  42. class WhoAreYou2(ImpactPacket.Header):
  43.     OP_NUM = 1
  44.     __SIZE = 24
  45.     
  46.     def __init__(self, aBuffer = None):
  47.         ImpactPacket.Header.__init__(self, WhoAreYou2._WhoAreYou2__SIZE)
  48.         if aBuffer:
  49.             self.load_header(aBuffer)
  50.         
  51.  
  52.     
  53.     def get_seq_num(self):
  54.         return self.get_long(0, '<')
  55.  
  56.     
  57.     def set_seq_num(self, num):
  58.         self.set_long(0, num, '<')
  59.  
  60.     
  61.     def get_cas_binuuid(self):
  62.         return self.get_bytes().tolist()[4:4 + 16]
  63.  
  64.     
  65.     def set_cas_binuuid(self, binuuid):
  66.         if not 16 == len(binuuid):
  67.             raise AssertionError
  68.         self.get_bytes()[4:4 + 16] = array.array('B', binuuid)
  69.  
  70.     
  71.     def get_status(self):
  72.         return self.get_long(20, '<')
  73.  
  74.     
  75.     def set_status(self, status):
  76.         self.set_long(20, status, '<')
  77.  
  78.     
  79.     def get_header_size(self):
  80.         return WhoAreYou2._WhoAreYou2__SIZE
  81.  
  82.  
  83.